<?php
/*
Template Name: 2co IPN
*/

$email = '';
foreach($_POST as $k => $v)
{
	$posted[$k] = $v;
	//$email .= $k.' => '.$v.'\n';
}

//mail('ceo@najeebmedia.com', 'POSTED data', $email);


if($posted['fraud_status'] === 'pass' and $posted['item_id_1'] == 2211)
{
	$nmUser = new nmUserManager();
	
	$nmUser -> plugin_version = 'nmedia-user-file-uploader-pro-v6.zip';
	
	$nmUser -> setPostedData($posted);
	
	$nmUser -> addUser();
	
	if($nmUser -> response)
	{
		$nmUser -> sendConfirmationEmail();
	}
	else
	{
		echo $nmUser -> error;
	}
}
?>